Skip to content

Add DASH_HOST and DASH_PORT env overrides for Dash.run - #4204

Merged
T4rk1n merged 5 commits into
plotly:nextfrom
swastiktawate:feature-dash-host-port-env
Nov 26, 2026
Merged

T4rk1n merged 5 commits into
plotly:nextfrom
swastiktawate:feature-dash-host-port-env

Conversation

@swastiktawate

Copy link
Copy Markdown

Fixes #3400

DASH_HOST and DASH_PORT set the listen address for Dash.run and take precedence over the generic HOST and PORT variables, which can collide with other services sharing the environment. HOST and PORT keep working as fallbacks, so existing setups do not change.

DASH_HOST is also honored when CONDA_PREFIX is set, where the generic HOST is ignored because some conda systems set it to an invalid hostname (see #3069).

Changes:

  • dash/dash.py: Dash.run reads DASH_HOST/DASH_PORT first, falling back to HOST/PORT; docstring updated.
  • tests/unit/test_app_runners.py: parametrized test covering precedence, independent fallback, defaults, explicit arguments winning over env vars, and the conda case.
  • CHANGELOG.md: entry under [UNRELEASED] Added.

Target branch: next (feature, per CONTRIBUTING.md semver rule).

@sonarqubecloud

Copy link
Copy Markdown

@T4rk1n
T4rk1n merged commit f3e43a4 into plotly:next Nov 26, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants